#ifndef _FW_UPDATE_H_
#define _FW_UPDATE_H_
#include "main.h"
typedef enum
{
    FW_UPDATE_IDLE,
    FW_UPDATE_OK,
    FW_UPDATE_ERROR
}fw_update_state;
void fmc_erase(uint32_t address,uint8_t num);
void fmc_program(uint32_t address,uint16_t * data,int32_t len);
void FwUpdate(can_receive_message_struct receive_message);
void system_reset(void);
uint8_t CrcAdd(uint8_t * buffer,uint32_t size);
#endif
